import request from '@/utils/request'

export default {
  getList(currentPage, pageSize, gymQueryVo) {
    return request({
      url: `/gym/search/${currentPage}/${pageSize}`,
      method: 'post',
      data: gymQueryVo
    })
  },

  // 删除
  remove(id){
    return request({
      url: `/gym/${id}`,
      method: 'delete',
    })
  },

  add(gym){
    return request({
      url: `/gym`,
      method: 'post',
      data: gym
    })
  },

  // 根据id查询
  queryById(id){
    return request({
      url: `/gym/${id}`,
      method: 'get',
    })
  },

  edit(gym){
    return request({
      url: `/gym`,
      method: 'put',
      data: gym
    })
  },

  // 查询所有场馆
  queryAll(){
    return request({
      url: `/gym/queryAll`,
      method: 'get',
    })
  }
}
